--- title: DualGAN training loop keywords: fastai sidebar: home_sidebar summary: "Defines the loss and training loop functions/classes for DualGAN." description: "Defines the loss and training loop functions/classes for DualGAN." nb_path: "nbs/08_train.dualgan.ipynb" ---
set_seed(999, reproducible=True)
horse2zebra = untar_data('https://people.eecs.berkeley.edu/~taesung_park/CycleGAN/datasets/horse2zebra.zip')
folders = horse2zebra.ls().sorted()
trainA_path = folders[2]
trainB_path = folders[3]
testA_path = folders[0]
testB_path = folders[1]
dls = get_dls(trainA_path, trainB_path,num_A=100)
dual_gan = DualGAN()
learn = dual_learner(dls, dual_gan,show_img_interval=1)
learn.show_training_loop()
test_eq(type(learn),Learner)
learn.fit_flat_lin(5,5,2e-4)
learn.recorder.plot_loss(with_valid=False)